import React, { ReactNode } from 'react';
import { StyleContext, defaultContext, StyleContextProps } from './style-context';

interface StyleProviderProps {
    children: ReactNode;
    value?: StyleContextProps;
}

export const StyleProvider: React.FC<StyleProviderProps> = ({
                                                                children,
                                                                value = defaultContext,
                                                            }) => {
    return (
        <StyleContext.Provider value={value}>
            {children}
        </StyleContext.Provider>
    );
};